<div class="list-filter select-fiter" data-type="custom_month_time">

	<div class="list-filter-tit">{:L('TIME_LIMIT')}</div>
	<div class="list-filter-option <eq name='custom_month_time' value='prev-month'>active</eq>" data-value="prev-month">{:L('PREV_MONTH')}</div>
	<div class="list-filter-option <eq name='custom_month_time' value='this-month'>active</eq>" data-value="this-month">{:L('THIS_MONTH')}</div>
	<div class="list-filter-option <eq name='custom_month_time' value='this-season'>active</eq>" data-value="this-season">{:L('THIS_SEASON')}</div>
	<div class="list-filter-option mr20 <eq name='custom_month_time' value='this-year'>active</eq>" data-value="this-year">{:L('THIS_YEAR')}</div>
	<div class="list-filter-time <notempty name='custom_month_time'><notin name='custom_month_time' value='prev-month,this-month,this-season,this-year'>active</notin></notempty>" id="customMonthRange">
		<input type="text" class="w10 border-none white" <notempty name='custom_month_time'><notin name='custom_month_time' value='prev-month,this-month,this-season,this-year'>value="{$custom_month_time}"</notin></notempty> id="customMonthTime" />
		{:L('CUSTOM_TIME')}
	</div>

</div>

<script>

	layui.use('laydate',function()
	{
		var laydate = layui.laydate;

		var option = {
			elem:'#customMonthTime',
			eventElem: '#customMonthRange',
			type: 'month',
			range: true,
			trigger: 'click',
			btns: ['clear', 'confirm'],
			done: function(value)
			{
				$("input[name='custom_month_time']").val(value);

				$('#filterForm').submit();
			}
		};

		laydate.render(option);
	})

</script>